<template>

  <!--1.页签-->
  <el-tabs v-model="currentTab.name">
      <el-tab-pane v-for="item in tabs" 
                  :key="item.name" 
                  :label="item.name" 
                  :name="item.name">、
                  
        <template #label>
              <span class="custom-tabs-label">
                <el-icon>
                    <component :iS="item.icon"></component>
                </el-icon>
                <span>
                  &nbsp;{{ item.name }}
                </span>
              </span>

        </template>



      </el-tab-pane>

  </el-tabs>
</template>




<script setup lang="ts">

import { useTabsStore } from '@/store/tabs.ts';
const tabsStore=useTabsStore();

//1.避免解构出来的数据丢失响应式解构出来了tabsStore，页签的Pinia中的页签的数据
import { storeToRefs } from 'pinia';
const {tabs,currentTab}=storeToRefs(tabsStore) 





</script>